3.107 \(\int \frac{(a+b \tanh ^{-1}(c x))^2}{(d+c d x)^2} \, dx\)

Optimal. Leaf size=107 \[ -\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{b^2}{2 c d^2 (c x+1)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2} \]

[Out]

-b^2/(2*c*d^2*(1 + c*x)) + (b^2*ArcTanh[c*x])/(2*c*d^2) - (b*(a + b*ArcTanh[c*x]))/(c*d^2*(1 + c*x)) + (a + b*
ArcTanh[c*x])^2/(2*c*d^2) - (a + b*ArcTanh[c*x])^2/(c*d^2*(1 + c*x))

________________________________________________________________________________________

Rubi [A]  time = 0.124376, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {5928, 5926, 627, 44, 207, 5948} \[ -\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{b^2}{2 c d^2 (c x+1)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])^2/(d + c*d*x)^2,x]

[Out]

-b^2/(2*c*d^2*(1 + c*x)) + (b^2*ArcTanh[c*x])/(2*c*d^2) - (b*(a + b*ArcTanh[c*x]))/(c*d^2*(1 + c*x)) + (a + b*
ArcTanh[c*x])^2/(2*c*d^2) - (a + b*ArcTanh[c*x])^2/(c*d^2*(1 + c*x))

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rule 5926

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b
*ArcTanh[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 627

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c*x)/e)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{(d+c d x)^2} \, dx &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{(2 b) \int \left (\frac{a+b \tanh ^{-1}(c x)}{2 d (1+c x)^2}-\frac{a+b \tanh ^{-1}(c x)}{2 d \left (-1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b \int \frac{a+b \tanh ^{-1}(c x)}{(1+c x)^2} \, dx}{d^2}-\frac{b \int \frac{a+b \tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \frac{1}{(1+c x) \left (1-c^2 x^2\right )} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \frac{1}{(1-c x) (1+c x)^2} \, dx}{d^2}\\ &=-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac{b^2 \int \left (\frac{1}{2 (1+c x)^2}-\frac{1}{2 \left (-1+c^2 x^2\right )}\right ) \, dx}{d^2}\\ &=-\frac{b^2}{2 c d^2 (1+c x)}-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}-\frac{b^2 \int \frac{1}{-1+c^2 x^2} \, dx}{2 d^2}\\ &=-\frac{b^2}{2 c d^2 (1+c x)}+\frac{b^2 \tanh ^{-1}(c x)}{2 c d^2}-\frac{b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}\\ \end{align*}

Mathematica [A]  time = 0.131612, size = 124, normalized size = 1.16 \[ \frac{-4 a^2+2 a b \log (c x+1)+2 a b c x \log (c x+1)-b (2 a+b) (c x+1) \log (1-c x)-4 b (2 a+b) \tanh ^{-1}(c x)-4 a b+b^2 \log (c x+1)+b^2 c x \log (c x+1)+2 b^2 (c x-1) \tanh ^{-1}(c x)^2-2 b^2}{4 c d^2 (c x+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])^2/(d + c*d*x)^2,x]

[Out]

(-4*a^2 - 4*a*b - 2*b^2 - 4*b*(2*a + b)*ArcTanh[c*x] + 2*b^2*(-1 + c*x)*ArcTanh[c*x]^2 - b*(2*a + b)*(1 + c*x)
*Log[1 - c*x] + 2*a*b*Log[1 + c*x] + b^2*Log[1 + c*x] + 2*a*b*c*x*Log[1 + c*x] + b^2*c*x*Log[1 + c*x])/(4*c*d^
2*(1 + c*x))

________________________________________________________________________________________

Maple [B]  time = 0.056, size = 341, normalized size = 3.2 \begin{align*} -{\frac{{a}^{2}}{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) }{2\,c{d}^{2}}}-{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) }{c{d}^{2} \left ( cx+1 \right ) }}+{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) }{2\,c{d}^{2}}}-{\frac{{b}^{2} \left ( \ln \left ( cx-1 \right ) \right ) ^{2}}{8\,c{d}^{2}}}+{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{4\,c{d}^{2}}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }-{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{4\,c{d}^{2}}}-{\frac{{b}^{2}}{2\,c{d}^{2} \left ( cx+1 \right ) }}+{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{4\,c{d}^{2}}}-{\frac{{b}^{2}}{4\,c{d}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) \ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{4\,c{d}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }-{\frac{{b}^{2} \left ( \ln \left ( cx+1 \right ) \right ) ^{2}}{8\,c{d}^{2}}}-2\,{\frac{ab{\it Artanh} \left ( cx \right ) }{c{d}^{2} \left ( cx+1 \right ) }}-{\frac{ab\ln \left ( cx-1 \right ) }{2\,c{d}^{2}}}-{\frac{ab}{c{d}^{2} \left ( cx+1 \right ) }}+{\frac{ab\ln \left ( cx+1 \right ) }{2\,c{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x)

[Out]

-1/c*a^2/d^2/(c*x+1)-1/c*b^2/d^2*arctanh(c*x)^2/(c*x+1)-1/2/c*b^2/d^2*arctanh(c*x)*ln(c*x-1)-1/c*b^2/d^2*arcta
nh(c*x)/(c*x+1)+1/2/c*b^2/d^2*arctanh(c*x)*ln(c*x+1)-1/8/c*b^2/d^2*ln(c*x-1)^2+1/4/c*b^2/d^2*ln(c*x-1)*ln(1/2+
1/2*c*x)-1/4/c*b^2/d^2*ln(c*x-1)-1/2*b^2/c/d^2/(c*x+1)+1/4/c*b^2/d^2*ln(c*x+1)-1/4/c*b^2/d^2*ln(-1/2*c*x+1/2)*
ln(1/2+1/2*c*x)+1/4/c*b^2/d^2*ln(-1/2*c*x+1/2)*ln(c*x+1)-1/8/c*b^2/d^2*ln(c*x+1)^2-2/c*a*b/d^2*arctanh(c*x)/(c
*x+1)-1/2/c*a*b/d^2*ln(c*x-1)-1/c*a*b/d^2/(c*x+1)+1/2/c*a*b/d^2*ln(c*x+1)

________________________________________________________________________________________

Maxima [B]  time = 0.990188, size = 374, normalized size = 3.5 \begin{align*} -\frac{1}{2} \,{\left (c{\left (\frac{2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac{\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac{\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} + \frac{4 \, \operatorname{artanh}\left (c x\right )}{c^{2} d^{2} x + c d^{2}}\right )} a b - \frac{1}{8} \,{\left (4 \, c{\left (\frac{2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac{\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac{\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} \operatorname{artanh}\left (c x\right ) + \frac{{\left ({\left (c x + 1\right )} \log \left (c x + 1\right )^{2} +{\left (c x + 1\right )} \log \left (c x - 1\right )^{2} - 2 \,{\left (c x +{\left (c x + 1\right )} \log \left (c x - 1\right ) + 1\right )} \log \left (c x + 1\right ) + 2 \,{\left (c x + 1\right )} \log \left (c x - 1\right ) + 4\right )} c^{2}}{c^{4} d^{2} x + c^{3} d^{2}}\right )} b^{2} - \frac{b^{2} \operatorname{artanh}\left (c x\right )^{2}}{c^{2} d^{2} x + c d^{2}} - \frac{a^{2}}{c^{2} d^{2} x + c d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="maxima")

[Out]

-1/2*(c*(2/(c^3*d^2*x + c^2*d^2) - log(c*x + 1)/(c^2*d^2) + log(c*x - 1)/(c^2*d^2)) + 4*arctanh(c*x)/(c^2*d^2*
x + c*d^2))*a*b - 1/8*(4*c*(2/(c^3*d^2*x + c^2*d^2) - log(c*x + 1)/(c^2*d^2) + log(c*x - 1)/(c^2*d^2))*arctanh
(c*x) + ((c*x + 1)*log(c*x + 1)^2 + (c*x + 1)*log(c*x - 1)^2 - 2*(c*x + (c*x + 1)*log(c*x - 1) + 1)*log(c*x +
1) + 2*(c*x + 1)*log(c*x - 1) + 4)*c^2/(c^4*d^2*x + c^3*d^2))*b^2 - b^2*arctanh(c*x)^2/(c^2*d^2*x + c*d^2) - a
^2/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

Fricas [A]  time = 2.05308, size = 215, normalized size = 2.01 \begin{align*} \frac{{\left (b^{2} c x - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} - 8 \, a^{2} - 8 \, a b - 4 \, b^{2} + 2 \,{\left ({\left (2 \, a b + b^{2}\right )} c x - 2 \, a b - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{8 \,{\left (c^{2} d^{2} x + c d^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="fricas")

[Out]

1/8*((b^2*c*x - b^2)*log(-(c*x + 1)/(c*x - 1))^2 - 8*a^2 - 8*a*b - 4*b^2 + 2*((2*a*b + b^2)*c*x - 2*a*b - b^2)
*log(-(c*x + 1)/(c*x - 1)))/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{a^{2}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac{b^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac{2 a b \operatorname{atanh}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx}{d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))**2/(c*d*x+d)**2,x)

[Out]

(Integral(a**2/(c**2*x**2 + 2*c*x + 1), x) + Integral(b**2*atanh(c*x)**2/(c**2*x**2 + 2*c*x + 1), x) + Integra
l(2*a*b*atanh(c*x)/(c**2*x**2 + 2*c*x + 1), x))/d**2

________________________________________________________________________________________

Giac [A]  time = 1.1786, size = 203, normalized size = 1.9 \begin{align*} \frac{1}{8} \,{\left (\frac{b^{2}}{c d^{2}} - \frac{2 \, b^{2}}{{\left (c d x + d\right )} c d}\right )} \log \left (\frac{1}{\frac{2 \, d}{c d x + d} - 1}\right )^{2} - \frac{{\left (2 \, a b + b^{2}\right )} \log \left (-\frac{2 \, d}{c d x + d} + 1\right )}{4 \, c d^{2}} - \frac{{\left (2 \, a b + b^{2}\right )} \log \left (\frac{1}{\frac{2 \, d}{c d x + d} - 1}\right )}{2 \,{\left (c d x + d\right )} c d} - \frac{2 \, a^{2} + 2 \, a b + b^{2}}{2 \,{\left (c d x + d\right )} c d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="giac")

[Out]

1/8*(b^2/(c*d^2) - 2*b^2/((c*d*x + d)*c*d))*log(1/(2*d/(c*d*x + d) - 1))^2 - 1/4*(2*a*b + b^2)*log(-2*d/(c*d*x
 + d) + 1)/(c*d^2) - 1/2*(2*a*b + b^2)*log(1/(2*d/(c*d*x + d) - 1))/((c*d*x + d)*c*d) - 1/2*(2*a^2 + 2*a*b + b
^2)/((c*d*x + d)*c*d)